{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>Pages / Register - NiceAdmin Bootstrap Template</title>
  <meta content="" name="description">
  <meta content="" name="keywords">

  <!-- Favicons -->
  <link href="/static/img/favicon.png" rel="icon">
  <link href="/static/img/apple-touch-icon.png" rel="apple-touch-icon">

  <!-- Google Fonts -->
  <link href="https://fonts.gstatic.com" rel="preconnect">
  <link
    href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Nunito:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
    rel="stylesheet">

  <!-- Vendor CSS Files -->
  <link href="/static/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="/static/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
  <link href="/static/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="/static/vendor/quill/quill.snow.css" rel="stylesheet">
  <link href="/static/vendor/quill/quill.bubble.css" rel="stylesheet">
  <link href="/static/vendor/remixicon/remixicon.css" rel="stylesheet">
  <link href="/static/vendor/simple-datatables/style.css" rel="stylesheet">

  <!-- Template Main CSS File -->
  <link href="/static/css/style.css" rel="stylesheet">

</head>

<body>

  <main>
    <div class="container">

      <section class="section register min-vh-100 d-flex flex-column align-items-center justify-content-center py-4">
        <div class="container">
          <div class="row justify-content-center">
            <div class="col-lg-4 col-md-6 d-flex flex-column align-items-center justify-content-center">

              <div class="d-flex justify-content-center py-4">
                <a href="{% url 'home' %}" class="logo d-flex align-items-center w-auto">
                  <img src="/static/img/logo.png" alt="">
                  <span class="d-none d-lg-block">智慧健康诊疗管理系统</span>
                </a>
              </div><!-- End Logo -->

              <div class="card mb-3">

                <div class="card-body">

                  <div class="pt-4 pb-2">
                    <h5 class="card-title text-center pb-0 fs-4">账号注册</h5>
                    <!-- <p class="text-center small">Enter your personal details to create account</p> -->
                  </div>

                  <form class="row g-3 needs-validation" novalidate action="{% url 'register' %}" method="post">
                    {% csrf_token %}
                    <div class="col-12">
                      <label for="yourName" class="form-label">用户名</label>
                      <input type="text" name="username" class="form-control" id="yourName" required>
                      <div class="invalid-feedback">请输入用户名</div>
                    </div>

                    <div class="col-12">
                      <label for="yourEmail" class="form-label">邮箱</label>
                      <input type="email" name="email" class="form-control" id="yourEmail" required>
                      <div class="invalid-feedback">请输入正确邮箱格式</div>
                    </div>
                    <div class="col-12">
                      <label class="col-sm-2 col-form-label">性别</label>
                      <div class="input-group has-validation">
                        <!-- <select class="form-select" aria-label="Default select example"> -->
                        <select class="form-select" name="sex">
                          <!-- <option selected>Open this select menu</option> -->
                          <option value="男" selected>男</option>
                          <option value="女">女</option>
                        </select>
                      </div>
                    </div>
                    <div class="col-12">
                      <label class="col-sm-2 col-form-label">年龄</label>
                      <div class="input-group has-validation">
                        <input type="text" name="age" class="form-control" id="age" required>
                      </div>
                    </div>

                    <div class="col-12">
                      <label class="col-sm-2 col-form-label">角色</label>
                      <div class="input-group has-validation">
                        <!-- <select class="form-select" aria-label="Default select example"> -->
                        <select class="form-select" name="role">
                          <!-- <option selected>Open this select menu</option> -->
                          <option value="1" selected>用户</option>
                          <option value="2">医生</option>
                        </select>
                      </div>
                    </div>


                    <div class="col-12">
                      <label for="yourPassword" class="form-label">密码</label>
                      <input type="password" name="password" class="form-control" id="yourPassword" required>
                      <div class="invalid-feedback">请输入密码</div>
                    </div>


                    <div class="col-12">
                      <button class="btn btn-primary w-100" type="submit">注册</button>
                    </div>


                    <div class="col-12">
                      <p class="small mb-0">已经有账号了? <a href="{% url 'login' %}">登陆</a></p>
                    </div>
                  </form>

                </div>
              </div>

            </div>

          </div>
        </div>
    </div>

    </section>

    </div>
  </main><!-- End #main -->

  <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i
      class="bi bi-arrow-up-short"></i></a>

  <!-- Vendor JS Files -->
  <script src="/static/vendor/apexcharts/apexcharts.min.js"></script>
  <script src="/static/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="/static/vendor/chart/chart.min.js"></script>
  <script src="/static/vendor/echarts/echarts.min.js"></script>
  <script src="/static/vendor/quill/quill.min.js"></script>
  <script src="/static/vendor/simple-datatables/simple-datatables.js"></script>
  <script src="/static/vendor/tinymce/tinymce.min.js"></script>
  <script src="/static/vendor/php-email-form/validate.js"></script>

  <!-- Template Main JS File -->
  <script src="/static/js/main.js"></script>

</body>

</html>